<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .con {
            width: 500px;
            height: 300px;
            border: 1px solid #ccc;
        }

        .item {
            width: 400px;
            height: 40px;
            background-color: pink;
            border-radius: 7px;
            margin: 5px 0;
            list-style: none;
            text-align: center;
            line-height: 40px;
        }
    </style>
</head>

<body>
    <button onclick="handleClick()">点击</button>
    <ul class="con">
        <li class="item firstItem">AAAAAAAA</li>
        <li class="item">BBBBBBBB</li>
        <li class="item item3">CCCCCCCC</li>
        <li class="item item4">DDDDDDDD</li>
        <li class="item lastItem">EEEEEEEE</li>
    </ul>
</body>
<script src="./js/Flip.js"></script>
<script>
    let items = document.querySelectorAll(".item");
    let item3 = document.querySelector(".item3");
    let firstliRect = document.querySelector(".firstItem");
    let item4 = document.querySelector(".item4");
    let fatherDom = document.querySelector(".con");
    let f = new Flip(items)

    function handleClick() {
        fatherDom.insertBefore(firstliRect, null)
        fatherDom.appendChild(item3)
        f.play()
    }
</script>

</html>